home *** CD-ROM | disk | FTP | other *** search
- package java.util;
-
- import java.io.Serializable;
-
- class Collections$SingletonMap<K, V> extends AbstractMap<K, V> implements Serializable {
- private static final long serialVersionUID = -6979724477215052911L;
- // $FF: renamed from: k java.lang.Object
- private final K field_0;
- // $FF: renamed from: v java.lang.Object
- private final V field_1;
- private transient Set<K> keySet = null;
- private transient Set<Map.Entry<K, V>> entrySet = null;
- private transient Collection<V> values = null;
-
- Collections$SingletonMap(K var1, V var2) {
- this.field_0 = var1;
- this.field_1 = var2;
- }
-
- public int size() {
- return 1;
- }
-
- public boolean isEmpty() {
- return false;
- }
-
- public boolean containsKey(Object var1) {
- return Collections.access$000(var1, this.field_0);
- }
-
- public boolean containsValue(Object var1) {
- return Collections.access$000(var1, this.field_1);
- }
-
- public V get(Object var1) {
- return (V)(Collections.access$000(var1, this.field_0) ? this.field_1 : null);
- }
-
- public Set<K> keySet() {
- if (this.keySet == null) {
- this.keySet = Collections.singleton(this.field_0);
- }
-
- return this.keySet;
- }
-
- public Set<Map.Entry<K, V>> entrySet() {
- if (this.entrySet == null) {
- this.entrySet = Collections.singleton(new AbstractMap.SimpleImmutableEntry(this.field_0, this.field_1));
- }
-
- return this.entrySet;
- }
-
- public Collection<V> values() {
- if (this.values == null) {
- this.values = Collections.singleton(this.field_1);
- }
-
- return this.values;
- }
- }
-